Switch Statement (Custom Formula)
Use the switch / case statement inside your the node editor.
There's currently no native switch / case statement in toddle. So if you wanted to use a switch statement inside the node editor you had to create a custom formula.
Using this package, you can add the switch / case node straight into your editor and visually set up a switch statement.
Formulas
switchStatement
A 'node' that acts as a switch / case statement
Arguments
switchInput Equivalent to value that goes in switch(value) of the traditional switch statement cases Equivalent to the case - return of the traditional switch statement. defaultValue Equivalent to default of the traditional switch statement
Example
Enter an integer to convert it to month & season
Month: null
Season: null
Breakdown
Enter an animal to check its type (elephant, tiger, bear, and pig)
Type:null